package com.sgb.kjwl.view.ui.adapter.self.pick;

import android.content.Context;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.user.UserMachineEntity;
import com.sgb.kjwl.model.entity.user.UserMaterialEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class UserMachineAdapter extends BaseRecycleAdapter<UserMachineEntity> {

    public UserMachineAdapter(Context context, List<UserMachineEntity> datas) {
        super(context, R.layout.item_user_machine, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, final UserMachineEntity entity) {
        holder.setBinding(BR.viewModel, entity);
    }

    private UserMachineAdapter.onEditClickListener editClickListener;

    public void setonEditClick(UserMachineAdapter.onEditClickListener editClickListener) {
        this.editClickListener = editClickListener;
    }

    public interface onEditClickListener {
        void onDetailedListClick(UserMachineEntity entity, int position);
    }
}
